using System;
using System.Collections.Generic;
using System.Text;
using System.Data.SqlClient;

namespace LiveStock.dataAccess
{
    class Weights
    {
        private Weights() { }

        public static int WeightSelectByUserIDWeightName(int userID, string weightName)
        {
            int weight = 0;
            using (SqlCommand cmd = DBManager.GetCommand("WeightSelectByUserIDWeightName"))
            {
                cmd.Parameters.AddWithValue("@UserID", userID);
                cmd.Parameters.AddWithValue("@WeightName", weightName);
                weight = Convert.ToInt32(DBManager.ExecuteScalar(cmd));
            }
            return weight;
        }
    }
}
